home *** CD-ROM | disk | FTP | other *** search
-
- AA-Array.DLL manages the creation, accessing, saving to and
- restoring from disk (persistence) of extended arrays. The size of
- these extended arrays is only limited by the amount of virtual
- memory on your computer. Extended arrays have one column, hence
- are lists of elements. Extended arrays do not have the normal
- Visual Basic (<32,767 elements and <64,000 bytes of string space)
- limits. Extended arrays can have any number of elements up to 4
- Gigs and use any amount of string space.
-
- Data types of an extended array element can be: Integer, Long,
- Single, Double, Currency, or String. In the registered version,
- array elements can be of User defined types. AA-Array optimizes
- access to and storage of sparse arrays (i.e. arrays that have many
- possible elements, but few element have anything in them).
-
- AA-ARRAY.DLL is distributed as Shareware. Try before you buy. If
- you continue using it, you are expected to register. See AA-
- ARRAY.HLP for information on the benefits of registering. See
- ORDER.TXT for information on how to register.
-
- AA-Software International
- 12 ter Domaine Du Bois Joli
- 06330 Roquefort-Les-Pins, France
- Tel: (+33) 93.77.50.47
- Fax: (+33) 93.77.19.78
- Internet: cswilly@acm.org
- CompuServe: 100343,2570
- X400: (C=US; A=CompuServe; P=csmail; D=ID:100343,2570)
-
-
- To use a sort routine in AA-Array.DLL, first make sure the DLL can
- be found on the DOS path or is in the Windows or System directory.
- All the routines are as easy to use as the following example.
-
- 'Make sure the file AA-ARRAY.DLL is in your DOS Path
- 'Put the lines below in the declaration section of a form
- Declare Function AryOpenString Lib "AA-Array.dll" (
- ByVal aryName_s As String, ByVal mode As Integer,
- ByVal password_s As String) As Integer
- Declare Function AryClose Lib "AA-Array.dll" (
- ByVal ary_h As Integer) As Integer
- Declare Sub ArySetBounds Lib "AA-Array.dll" (
- ByVal ary_h As Integer, ByVal minElement As Long,
- ByVal maxElement As Long)
- Declare Sub AryGetBounds Lib "AA-Array.dll" (
- ByVal ary_h As Integer, minElement As Long, maxElement As
- Long)
- Declare Sub ArySetString Lib "AA-Array.dll" (
- ByVal ary_h As Integer, ByVal row_l As Long, value As String)
- Declare Sub AryGetString Lib "AA-Array.dll" (
- ByVal ary_h As Integer, ByVal row_l As Long, value As String)
-
-
- ' Put the following in the startup for a form
-
- 'Create extended string array
- Dim strAry_h As Integer
- strAry_h = AryOpenString("c:\tstStr.ary",
- AryCreateNew + AryPersistent, "")
- If strAry_h < 0 Then
- Me.Print "Cannot create extended array."
- Me.Print "Error code is: "; strAry_h
- Exit Sub
- End If
-
- 'Set the array's lower and upper bounds
- 'Bounds can be from -2,147,483,648 to +2,147,483,647
- Const firstElement = 2147483547
- ArySetBounds strAry_h, firstElement, firstElement + 100
-
- 'Set the odd elements.
- 'Even are not set and do not use extra memory
- Dim dummyString As String
- dummyString = Space(1311)
- Dim i As Long
- For i = firstElement To firstElement + 100 Step 2
- ArySetString strAry_h, i, Str$(i) & dummyString
- Next i
-
- 'Close the extended array and free up memory
- Dim retval As Integer
- retval = AryClose(strAry_h)
- If retval < 0 Then
- Me.Print "Cannot write extended array to disk."
- Me.Print "Error code is: "; strAry_h
- Exit Sub
- End If
-
- 'Open extended string array
- strAry_h = AryOpenString("c:\tstStr.ary",
- AryUseExisting + AryPersistent, "")
- If strAry_h < 0 Then
- Me.Print "Cannot open extended array."
- Me.Print "Error code is: "; strAry_h
- Exit Sub
- End If
-
- 'Get the array's lower and upper bounds
- Dim lowerBound As Long
- Dim upperBound As Long
- AryGetBounds strAry_h, lowerBound, upperBound
- Me.Print lowerBound, upperBound
-
- 'Get the every element (even elements will be null strings)
- Dim retString As String
- For i = lowerBound To upperBound
- AryGetString strAry_h, i, retString
- Me.Print i, Trim$(retString)
- Next i
-
- 'Close extended array and free up memory
- retval = AryClose(strAry_h)
- If retval < 0 Then
- Me.Print "Cannot write extended array to disk."
- Me.Print "Error code is: "; strAry_h
- Exit Sub
- End If
-